package goylc

// DFA 确定性有限自动

type GoylcDFA struct {
	states      []*GoylcState
	alphas      []GoylcAlpha
	jump_table  JumpTableDFA
	start_state []GoylcStateId
	end_states  GoylcStateId
}

// 定义 DFA
// DFA 为 NFA 的特殊状态，但：
// 每个状态对每个字符输入只有一个后继状态
// 而且不用空串ε作为输入字符，其余和NFA一样
func defineDFA(states []*GoylcState, alphas []GoylcAlpha,
	jump_table JumpTableDFA,
	start_state []GoylcStateId, end_states GoylcStateId) *GoylcDFA {

	return &GoylcDFA{
		states:      states,
		alphas:      alphas,
		jump_table:  jump_table,
		start_state: start_state,
		end_states:  end_states,
	}
}
